<template>
  <el-avatar v-bind="$attrs" @error="(e) => emit('error', e)">
    <template
      v-for="item in $attrs.slots"
      #[item.name]="scopedData"
      :key="item.name"
    >
      <component :is="item.content" v-bind="scopedData" />
    </template>
  </el-avatar>
</template>

<script setup>
const emit = defineEmits(['error'])
</script>
